<include file="Public/header"/>
<body>      
<header>
      <div class="tab_nav">
        <div class="header">
          <div class="h-left"><a class="sb-back" href="javascript:history.back(-1)" title="返回"></a></div>
          <div class="h-mid">我的评价</div>
          <div class="h-right">
            <aside class="top_bar">
              <div onClick="show_menu();$('#close_btn').addClass('hid');" id="show_more"><a href="javascript:;"></a> </div>
            </aside>
          </div>
        </div>
      </div>
</header>
<include file="Public/menu"/>
<div id="tbh5v0">
<div class="order">      
      <div class="Evaluation">
            <ul>
              <li><a href="{:U('User/comment',array('status'=>-1))}" class="tab_head <if condition='$_GET[status] eq -1'>on</if>" id="goods_ka1" onClick="setGoodsTab('goods_ka',1,3)">全部评价</a></li>
              <li><a href="{:U('User/comment',array('status'=>0))}" class="tab_head  <if condition='$_GET[status] eq 0'>on</if>" id="goods_ka2" onClick="setGoodsTab('goods_ka',2,3)">待评价</a></li>
              <li><a href="{:U('User/comment',array('status'=>1))}" class="tab_head  <if condition='$_GET[status] eq 1'>on</if>" id="goods_ka3" onClick="setGoodsTab('goods_ka',3,3)">已评价</a></li>
            </ul>
      </div>
	<div class="Emain" id="user_goods_ka_1" style="display:block;">
    <foreach name="comment_list" item="vo" key="k"> 
    <div class="pingjia">
          <h2>购买时间：{$vo.add_time}</h2>
          <dl>
          <dt><img src="{$vo.goods_id|goods_thum_images=200,200}"></dt>
          <dd><span>{$vo.goods_name}</span><strong>￥{$vo.goods_price}</strong></dd>
          <dd>
          	<if condition="$vo[is_comment] eq 0">
          	<!--<a class="remark" href="{:U('User/add_comment',array('rec_id'=>$vo[rec_id]))}">评价订单</a>-->
				<a class="remark" href="{:U('Mobile/User/comment_list',array('order_id'=>$vo['order_id'],'store_id'=>$vo['store_id'],'goods_id'=>$vo['goods_id']))}">评价订单</a>
          	<else/>
          	<a class="remark" href="{:U('User/order_detail',array('id'=>$vo[order_id]))}">查看订单</a>
          	</if>
          </dd>
          </dl>
		  <if condition="$vo[is_comment] eq 1">
		 	<div class="pj_main">
		       <ul>

		       		<li><em>评价：</em><img src="__STATIC__/images/stars{$vo.goods_rank|ceil}.png"></li>
                    
		       		<li class="pj_w">{$vo.content|htmlspecialchars_decode}</li>
		       </ul>		
				<!--晒单-->
				<if condition="$v['img'] neq ''">
			       <ul>
			       		<li><em>晒单：{$vo.comment.title}</em></li>
			       		<li class="pj_w">{$vo.comment.message}</li>
			       </ul>
			       <div class="sd_img">
			        <dl id="gallery">
					<foreach name="vo['img']"  key="key" item="v2">
				       <dd><a href="{$v2}"><img src="{$v2}" width="100px" heigth="100px"></a></dd>
					</foreach>
			        </dl>
			       </div>
				</if>
				<!--管理员回复-->			
				<foreach name="replyList" item="val">
				       <ul style="border-top:1px dashed #e5e5e5; padding-top:8px; margin-top:10px">
				       <li><em style=" color:#F60">管理员{$val.user_name}回复：</em></li>
				       <li class="pj_w" style=" color:#F60; font-size:12px;">{$val.content}</li>
				       </ul>
				</foreach> 
		  	</div>
		   </if>                
    </div>
  </foreach> 
</div>      
<notempty name="comment_list">
   <div id="getmore" style="font-size:.24rem;text-align: center;color:#888;padding:.25rem .24rem .4rem; clear:both">
  		<a href="javascript:void(0)" onClick="ajax_sourch_submit()">点击加载更多</a>
  </div>
</notempty>
</div>
<script>
var  page = 1;
 /*** ajax 提交表单 查询订单列表结果*/
 function ajax_sourch_submit()
 {
        page += 1;
		$.ajax({
			type : "GET",
			url:"{:U('Mobile/User/comment',array('status'=>$_GET['status']),'')}/is_ajax/1/p/"+page,//+tab,
//			data : $('#filter_form').serialize(),// 你的formid 搜索表单 序列化提交
			success: function(data)
			{
				if($.trim(data) == '')
					$('#getmore').hide();
				else
				    $("#user_goods_ka_1").append(data);
			}
		});
 } 
</script>

<script>
function goTop(){
	$('html,body').animate({'scrollTop':0},600);
}
</script>
<a href="javascript:goTop();" class="gotop"><img src="__STATIC__/images/topup.png"></a>
</div>
<include file="Public/footer_nav"/>
</body>
</html>